package com.test.selenium.data;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.ss.usermodel.Row;

public class MovementData {
	boolean debugMode = false;
	
	//Movement
	private String ModeCode;
	private String CarrierCode;
	private String MovementTypeCode;
	private String UOM;
	private String PrintingCurrency;
	private String PaymenttermCode;
	private String Shipper;
	private String Consignee;
	private String OriginSiteCode;
	private String OriginPortCode;
	private String DestinationSiteCode;
	private String DestinationPortCode;
	private String FlightNumber;
	//MovementCharges
	private String ChargeCode;
	private String Basis;
	private String CostRate;
	private String PrintRate;
	
	private String recoverPiece;
	
	public MovementData(HSSFSheet movementSheet) {
		Row row = movementSheet.getRow(1);
		
		//Movement
		ModeCode = row.getCell(0).getStringCellValue().trim();
		CarrierCode = row.getCell(1).getStringCellValue().trim();
		MovementTypeCode = row.getCell(2).getStringCellValue().trim();
		UOM = row.getCell(3).getStringCellValue().trim();
		PrintingCurrency = row.getCell(4).getStringCellValue().trim();
		PaymenttermCode =row.getCell(5).getStringCellValue().trim();
		Shipper = row.getCell(6).getStringCellValue().trim();
		Consignee = row.getCell(7).getStringCellValue().trim();
		OriginSiteCode = row.getCell(8).getStringCellValue().trim();
		OriginPortCode = row.getCell(9).getStringCellValue().trim();
		DestinationSiteCode = row.getCell(10).getStringCellValue().trim();
		DestinationPortCode =row.getCell(11).getStringCellValue().trim();
		FlightNumber = row.getCell(12).getStringCellValue().trim();
		//MovementCharges
		ChargeCode = row.getCell(13).getStringCellValue().trim();
		Basis = row.getCell(14).getStringCellValue().trim();
		CostRate = row.getCell(15).getStringCellValue().trim();
		PrintRate = row.getCell(16).getStringCellValue().trim();
		recoverPiece = row.getCell(17).getStringCellValue().trim();
		
		if (debugMode) {
			printData();
		}
	}
	
	public void printData() {
		//Movement
		System.out.println("ModeCode: " + ModeCode);
		System.out.println("CarrierCode: " + CarrierCode);
		System.out.println("MovementTypeCode: " + MovementTypeCode);
		System.out.println("UOM: " + UOM);
		System.out.println("PrintingCurrency: " + PrintingCurrency);
		System.out.println("PaymenttermCode: " + PaymenttermCode);
		System.out.println("Shipper: " + Shipper);
		System.out.println("Consignee: " + Consignee);
		System.out.println("OriginSiteCode: " + OriginSiteCode);
		System.out.println("OriginPortCode: " + OriginPortCode);
		System.out.println("DestinationSiteCode: " + DestinationSiteCode);
		System.out.println("DestinationPortCode: " + DestinationPortCode);
		System.out.println("FlightNumber: " + FlightNumber);
		//MovementCharges
		System.out.println("ChargeCode: " + ChargeCode);
		System.out.println("Basis: " + Basis);
		System.out.println("CostRate: " + CostRate);
		System.out.println("PrintRate: " + PrintRate);
		System.out.println("recoverPiece: " + recoverPiece);
	}
	
	//Movement
	public String getModeCode() {
		return this.ModeCode;
	}
	
	public String getCarrierCode() {
		return this.CarrierCode;
	}
	
	public String getMovementTypeCode() {
		return this.MovementTypeCode;
	}
	
	public String getUOM() {
		return this.UOM;
	}
	
	public String getPrintingCurrency() {
		return this.PrintingCurrency;
	}
	
	public String getPaymenttermCode() {
		return this.PaymenttermCode;
	}
	
	public String getShipper() {
		return this.Shipper;
	}
	
	public String getConsignee() {
		return this.Consignee;
	}
	
	public String getOriginSiteCode() {
		return this.OriginSiteCode;
	}
	
	public String getOriginPortCode() {
		return this.OriginPortCode;
	}
	
	public String getDestinationSiteCode() {
		return this.DestinationSiteCode;
	}
	
	public String getDestinationPortCode() {
		return this.DestinationPortCode;
	}
	
	public String getFlightNumber() {
		return this.FlightNumber;
	}
	
	//MovementCharges
	public String getChargeCode() {
		return this.ChargeCode;
	}
	
	public String getBasis() {
		return this.Basis;
	}
	
	public String getCostRate() {
		return this.CostRate;
	}
	
	public String getPrintRate() {
		return this.PrintRate;
	}
	
	public String getRecoverPiece() {
		return this.recoverPiece;
	}
}
